//
//  TypeViewController.m
//  ios
//
//  Created by 牛冬冬 on 2018/3/26.
//  Copyright © 2018年 Jevons-niu. All rights reserved.
//

#import "TypeViewController.h"
#import <React/RCTRootView.h>
#import "OtherViewController.h"

@interface TypeViewController ()

@end

@implementation TypeViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    // Do any additional setup after loading the view.
    self.title = @"分类";
    
    UIButton *btn = [UIButton buttonWithType:UIButtonTypeSystem];
    [btn setFrame:CGRectMake(20, 120, 335, 44)];
    [btn setTitle:@"跳转" forState:0];
    [btn addTarget:self action:@selector(btnClick) forControlEvents:UIControlEventTouchUpInside];
    [self.view addSubview:btn];
    
//    NSURL *jsCodeLocation = [NSURL URLWithString:@"http://localhost:8081/index.bundle?platform=ios"];
//    RCTRootView *rootView = [[RCTRootView alloc] initWithBundleURL:jsCodeLocation
//                                                        moduleName:@"RNDemos"
//                                                 initialProperties:@{@"moduleId":@"10002"}
//                                                     launchOptions:nil];
//    self.view = rootView;
}

- (void)btnClick
{
    OtherViewController *vc = [[OtherViewController alloc] init];
//    vc.moduleId = @"20001";
    [[[Helper share] currentViewController].navigationController pushViewController:vc animated:YES];
}

- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

/*
#pragma mark - Navigation

// In a storyboard-based application, you will often want to do a little preparation before navigation
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
    // Get the new view controller using [segue destinationViewController].
    // Pass the selected object to the new view controller.
}
*/

@end
